<!DOCTYPE html>
<html>
<head>
  <title>Calculator Plugin</title>
  <script>
    function calculate() {
      var num1 = document.getElementById("num1").value;
      var num2 = document.getElementById("num2").value;
      var operator = document.getElementById("operator").value;
      var result = document.getElementById("result");

      switch (operator) {
        case "+":
          result.value = Number(num1) + Number(num2);
          break;
        case "-":
          result.value = Number(num1) - Number(num2);
          break;
        case "*":
          result.value = Number(num1) * Number(num2);
          break;
        case "/":
          result.value = Number(num1) / Number(num2);
          break;
        default:
          result.value = "Invalid operator";
      }
    }
  </script>
</head>
<body>
  <h1>Calculator Plugin</h1>
  <input type="text" id="num1" placeholder="Number 1">
  <input type="text" id="operator" placeholder="Operator (-, +, *, /)">
  <input type="text" id="num2" placeholder="Number 2">
  <button onclick="calculate()">Calculate</button>
  <br>
  <input type="text" id="result" readonly>
</body>
</html>